package com.shudes.game;

import com.shudes.util.*;

public class Seat {

	protected Integer number;
	
	public Seat(Integer number) {
		if(number==null) 
			throw new NullPointerException("seat number cannot be null."); 
		
		this.number=number; 
	}
	
	public Integer getNumber() {
		return number;
	}

	@Override
	public boolean equals(Object obj) {
		if(obj==null) 
			return false; 
		
		return (obj instanceof Seat) && obj.hashCode()==this.hashCode();
	}

	@Override
	public int hashCode() {
		return (""+number).hashCode();
	}

	@Override
	public String toString() {
		return Dumper.INSTANCE.dumpFlat(this); 
	}

	

}
